perm filename ASC.RAS[UP,DOC] blob sn#631842 filedate 1981-12-20 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00009 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Asc format is just nearing completion.  The doc is not ready.  The following
C00003 00003	Asc files-	Introduction				12/18/81 RAS
C00005 00004	  @F		- FontInfo
C00007 00005	  @S        	- skip page
C00008 00006	  @#		- character definitions
C00009 00007	Asc to Rst program	AscRst
C00015 00008	Rst to Asc program	RdRst
C00016 00009	Fnt and Vnt file conversion
C00018 ENDMK
C⊗;
Asc format is just nearing completion.  The doc is not ready.  The following
pages contain notes, do not munge...
Asc files-	Introduction				12/18/81 RAS

In Asc files there are commands to define font parameters, individual
characters and inclusion of comments.

This document describes Asc files and the programs that use them.

Send comments to RAS		-r

Note that Asc files contain no info about what chars are ligatures and
how kerning should be done.  For such text files, see ... programs by DRF.
It would be nice to include that info in an Asc file, to have it all in
one place, but it is needlessly complex.  It also means mixing device
independent and dependent data.  Probably the only effort to be made in
these lines is to include a pointer to the editable TFM file... -r


  @F		- FontInfo

The FontInfo section begins with the @F command line and includes all text
up to an  ending @F command.   The entire  FontInfo section must  be on  a
single page.

All FontInfo fields start with `@' and are discerned by the first distinct
character  string.    Capitalization  is   not  important.    All   fields
immediately follow  `=',  strings are  delimited  by square  brackets,  eg
`[string]' is  a  string of  length  6.   All numbers  are  decimal.   All
FontInfo length measurements must be in points (reals).

An example of a FontInfo section follows.  For explanation of individual
fields, see Rst.ras[up,doc].

@Info    

    @First-char=0  @Last-char=127
    @Magnification (times 1000)=1500 
    @Designsize = 10.00000     points
    @Interline  = 12.00000     points
    @Spacewidth = 3.333333     points
    @Facetype   =[CMR]    @fontid=[j] 
    @Checkdigit =0
    @Rotation(degrees)=0   @Char-adv=0   @Line-adv=1
    @Output-device=[ImPrint-10]    @Resolution=240
    @Creator=[mf]

@Info

  @S        	- skip page

A skip command "@S" on a page prevents the rest of the page from being
read.  All text is skipped until the form-feed at the end of the page

Since all commands begin with "@", there is no need for delimited 
comments.  Any text not part of a command is ignored.

  @#		- character definitions

note that one can change the bit map of a character, including the 







Asc to Rst program	AscRst

AscRst makes Rst font files out of Asc files and old Rst files.  Start the
protram with the monitor command ".R AscRst" and you will be prompted for
a one-line command.

A description of the command line follows,  some of it in BNR form.   The
only BNR symbols used are "≡" to separate nonterrminals from their 
production and "|", the symbol for "or".

The command specifies one output Rst file that you want to make out of 
characters from one or more Asc and Rst files.

command ≡  OutFile = inlist		
inlist  ≡  interm | interm, inlist	
interm  ≡  ftype InFile S		
ftype	≡  + | /			

eg:			mysym = +mysym +exsym /mysym
or, equivalently	mysym = + + exsym /

OutFile and InFile:
The first file name encountered is special and is hereafter referred to as
"Spesh".  Fonts on Sail have magnifications in their extensions.  If Spesh
has no extension, it is assumed  to be at magnification 1.0.  Spesh's  mag
will hereafter be written "##".

OutFile always has the  name "Spesh.R##".  Any empty  file name is  always
assumed to be a file "Spesh.*##" where "*" is either "A" or "R".

If OutFile is  not specified,  it is given  the name  "Spesh.R##".  If  an
infile is  not  specified, if  it  follows a  "+",  it is  assumed  to  be
"Spesh.A##", if it follows a "/",  it is assumed to be "Spesh.R##".   Note
that at least one filename must be specified.

The ASC input  files, each preceded  by a plus-sign,  are each  translated
into RST  format and  merged  into OutFile.   The  RST input  files,  each
preceded by a  slash, are merged  into OutFile.  If  two files define  the
same character, the first definition only is used.

The command line is read sequentially, so if the command line:  
	"c.r12 = / g + h  / "
is given, all characters defined in the file g.r12 will be copied to c.r12
before those of h.r12 are added and finally the old file c.r12 is  merged.
Note that "C"'s magnification is carried as the default to the other  file
names.

The S in the command is an optional set specification following any  input
file.  If a set is not specified,  all characters defined in the file  are
used.  If elements in a set are duplicated, only the first is used.

S ≡ ( Li )		a list surrounded by parentheses
Li≡ E | E , Li		    the elements of the list are separated by commas
E ≡ R | R ← R		Each element is either a range or an "assignment range"
			    which assigns elements in the right range to those
			    of the left range before (possibly) transferring the
			    characters to the output file.
R ≡ # | #:# | P		A range is either a single number, or a range of numbers
			    specified by giving the first and last numbers or
			    a predefined set.  Note that the order of a range 
			    is important in assignment ranges.
Note below: D,O and C are nonterminals with obvious definitions, L,l,n and o
	    are terminals.
# ≡ D | 'O | .C |	A number is either a string of decimal digits, an
			    apostrophe followed by a string of octal digits or
			    a period followed by a single ascii character.
P ≡ L | l | n | o	These four commands denote sets of characters.
			    L= (.A:.Z), l= (.a:.z), n= (.0:.9), 
			    o= those not in (L,l,n)

So now the command:
	"C = cmr7(n) / cmr5(l=L) / cmr10"
makes a new font C.r10 that contains digits from a cmr7.a10 file, 5  point
caps from cmr5.r10 assigned to the lowercase letter positions and the rest
of the characters are 10 point cmr.   Note, however, that you have no  TFM
file to accompany it, there is no information about kerning or ligatures.

Rst to Asc program	RdRst

Fnt and Vnt file conversion

----------------------------------------
Fnt to Asc program	RdFnt

does not exist yet...

----------------------------------------
Vnt to Asc program	RdVnt

does not exist...  probably will never exist